<!doctype html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout" layout:decorate="~{theme/default/layout}">

<head>
    <meta property="og:title" th:content="${'动态 | ' + #servletContext.getAttribute('configMap')['blog_name']}" />
    <title>动态 | [[${#servletContext.getAttribute('configMap')['blog_name']}]]</title>
</head>

<body>
    <div id="wrap" class="content" layout:fragment="content">
    <!-- 图片 -->
    <div class="image-banner" style="color: #fff">
        <div class="image-content" th:if="${#strings.startsWith(currentNav.cover,'http') == true}"><img th:data-original="@{${currentNav.cover}}" class="lazyload"></div>
        <div class="image-content" th:if="${#strings.startsWith(currentNav.cover,'http') == false}"><img th:data-original="@{${prefix} + '/source/images/dynamic.png'}" class="lazyload"></div>
        <div class="descr">
            <a data-pjax th:href="@{/}">首页  /  </a>
            <a href="javascript:void(0)">动态</a>
        </div>
        <div class="title">动态</div>
    </div>

    <div class="ml-content">
        <div class="dynamic-content" id="dynamic-content">
            <div class="dynamic-item animate-box" data-animate-effect="pulse" th:each="dynamic : ${newPageInfo.data}">
                <div class="info">
                    <div class="row">
                        <div class="col-md-1">
                            <img class="hidden-xs" width="48" height="48" th:src="@{${#strings.isEmpty(#servletContext.getAttribute('configMap')['blog_avatar']) != true ? #servletContext.getAttribute('configMap')['blog_avatar'] :
                        (#strings.isEmpty(#servletContext.getAttribute('configMap')['logo_url']) !=true ? #servletContext.getAttribute('configMap')['logo_url'] : prefix + '/source/images/logo.png')}}">
                        </div>
                        <div class="col-md-11">
                            <div class="content" th:utext="${dynamic.content}"></div>
                        </div>
                    </div>
                </div>
                <div class="meta">
                            <span class="date">
                                <i class="fa fa-clock-o"></i> 发布于 [[${dynamic.timeDesc}]]
                            </span>
                    <a class="praise" href="javascript:void(0)" th:data-id="${dynamic.id}">
                        <i class="fa fa-heart-o"></i>&nbsp;<span class="praise-num">[[${dynamic.praiseNum}]]</span>
                    </a>
                </div>
            </div>
        </div>
        <div class="pagination animate-box">
            <a data-pjax class="prev page-numbers page" th:if="${newPageInfo.hasPreviousPage}" th:href="@{${newPageInfo.pageNum-1} == 1 ? '/dynamics/' : '/dynamics/page/' + ${newPageInfo.pageNum-1}+'/'}"><i class="fa fa-angle-left"></i></a>
            <a data-pjax
               th:each="pageNum : ${newPageInfo.navigatepageNums}"
               th:class="${pageNum == newPageInfo.pageNum ? 'page current' : 'page'}"
               th:href="@{${pageNum == newPageInfo.pageNum ? 'javascript:void(0)' :
                   (pageNum == -1 ? 'javascript:void(0)' : '/dynamics/page/' + pageNum + '/')}}" th:text="${pageNum == -1 ? '...' : pageNum}"></a>
            <a data-pjax class="next page-numbers page" th:if="${newPageInfo.hasNextPage}" th:href="@{'/dynamics/page/' + ${newPageInfo.pageNum + 1}+'/'}"><i class="fa fa-angle-right"></i></a>
        </div>
    </div>
</div>

</body>
</html>